home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 November
/
Ahoy_Magazine_86-11_1986_Double_L.d64
/
Date Ditty
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
426b
|
14 lines
0 print"[147]":poke53280,6:poke53281,1:poke646,0
1 print" commodares....date ditty #1 ":print:print
2 rem date ditty
3 rem solution by
4 rem keith kushner
5 rem
10 rem -valid for 1900's after 2/28/1900
20 rem -enter july 4, 1986 as 7,4,86
30 rem
40 for n=0 to 6:read d$(n):next
50 data saturday,sunday,monday,tuesday,wednesday,thursday,friday
60 input"m,d,y";m,d,y:if m<3 then m=m+12:y=y-1
70 n=d+2*m+int(.6*(m+1))+y+int(y/4)+3 : n=int((n/7-int(n/7))*7+.5):print d$(n)